package com.summer.dataStructure;

import java.util.PriorityQueue;

public class PriorityQueueTest {
	
	public static void main(String[] args) {
		int[] intList = {8,5,4,9,6,1,7,2,3,0};
		
		PriorityQueue<Integer> queue = new PriorityQueue<Integer>();
		
		for(int number : intList){
			queue.add(number);
		}
		
		for(int index=0;index<intList.length;index++){
			System.out.println(queue.poll());
		}
	}
	
}
